/*
 * SearchFilename.java Created on 06-Sep-2004 Copyright2004 Paul Mukherjee
 *
 * $Revision: 1.2 $
 */
package org.nanhill.support.hibernate.search.demo.filesearch;

import org.nanhill.commons.pattern.search.SearchException;

/**
 * @author pmu
 * 
 */
public class SearchFilename extends VolumeSearchCriterion {

	private String filename;

	public SearchFilename() {
	}

	public SearchFilename(String filename) {
		this.filename = filename;
	}

	public String getValue() {
		return filename;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.mukherjee.archivedb.pd.ISearch#accept(com.mukherjee.archivedb.pd.ISearchVisitor)
	 */
	public void accept(VolumeSearchVisitor visitor) throws SearchException {
		visitor.visitFilename(this);

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.mukherjee.archivedb.pd.search.ISearchCriterion#getDisplay()
	 */
	public String getDisplay() {
		return "File Name";
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.mukherjee.archivedb.pd.search.ISearchCriterion#getName()
	 */
	public String getName() {
		return "File.name";
	}

	public void setValue(String value) {
		filename = value;
	}

}
